SHELL = @SHELL@
CC    = @CC@
F77   = @F77@
CXX   = @CXX@
F90   = @F90@
MAKE  = @MAKE@
LIBS  = @LIBS@
MPIRUN= @MPIRUN@
NP_ARG= @NP_ARG@

all: all-redirect

PROGRAMS = matvec-master matvec-slave matvec-master-universe

SOURCES = matvec-master.f90 matvec-slave.f90 matvec-master-universe.f

all-redirect: ${PROGRAMS}

clean:
	rm -f *.o ${PROGRAMS} *~ PI*

.SUFFIXES: .o .c .f .cc .f90
.c:
	${CC} ${CFLAGS} -o $* $< ${LIBS} 
.c.o:
	${CC} ${CFLAGS} -c $<
.f:
	${F77} ${FFLAGS} -o $* $< ${LIBS}
.f.o:
	${F77} ${FFLAGS} -c $<
.f90:
	${F90} ${F90FLAGS} -o $* $< ${LIBS}
.cc:
	${CXX} ${CXXFLAGS} -o $* $< ${LIBS} 

run: ${PROGRAMS}
	${MPIRUN} ${NP_ARG} 4 xxx

sources:
	@echo ${SOURCES}
